<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .box {
      color: white;
      text-align: center;
      width: 500px;
      height: 400px;
      background-color: #ccc;
      /* text-shadow: 2px 2px 2px black; */
      cursor: pointer;
      white-space: nowrap;
      text-decoration: underline;

    }
    div.box1 {
      width: 50px;
      height: 100px;
      border: 1px solid red;
      /* 设置了没有，这个属性会叠加  转换成很内块可以解决= */
      /* display: inline-block; */
      text-decoration: none;

      
    }
    div a {
      display: inline-block;

      text-decoration: none;
    }
  </style>
</head>
<body>
  <div class="box">
    我是父与元素文本
    <div class="box1">
      我是块级元素文本
    </div>
    <span>内联元素文本</span>
    <!-- a标签特殊，颜色不会被继承覆盖 -->
    <a href="">aaaaaaaaa</a>
  </div>
</body>
</html>